﻿<%@ Page Title="" Language="C#" Theme = "DetailsView"MasterPageFile="~/Managers.master" AutoEventWireup="true" CodeFile="MStudentsAdd.aspx.cs" Inherits="MStudentsAdd" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:DetailsView 
         ID = "dtlStudents"
         HeaderText = "学生个人信息录入"
         SkinID = "Colorful"
         FooterText = "输入完毕点击插入"
         DataSourceID = "srcStudents"
         AutoGenerateInsertButton = "true"
         AutoGenerateRows = "false"
         DefaultMode = "Insert"
         AllowPaging = "true"
         runat = "server">
         <Fields>
         <asp:BoundField 
             DataField = "sid"
             HeaderText = "学号" />
        <asp:BoundField 
             DataField ="sname"
             HeaderText = "姓名" />
        <asp:BoundField 
             DataField = "ssex"
             HeaderText = "性别" />
        <asp:BoundField 
             DataField = "academy"
             HeaderText = "学院 " />
        <asp:BoundField 
             DataField =  "grade"
             HeaderText = "年级" />
        <asp:BoundField 
             DataField =  "class"
             HeaderText = "班级" />
        <asp:BoundField 
             DataField =  "password"
             HeaderText = "密码" />
        <asp:BoundField 
             DataField =  "b_n"
             HeaderText = "楼号" />
        <asp:BoundField 
             DataField =  "d_n"
             HeaderText = "宿舍号" />
        <asp:BoundField 
             DataField =  "contactway"
             HeaderText = "联系方式" />
        <asp:BoundField 
             DataField =  "moveintime"
             HeaderText = "入住时间" />
         </Fields>
     </asp:DetailsView>
     <asp:SqlDataSource 
         ID = "srcStudents"
         ConnectionString = "<%$ ConnectionStrings:Dormitory %>"
         InsertCommand = "insert students(sid,sname,ssex ,academy,grade,class,password,b_n,
         d_n,contactway,moveintime )
            values(@sid,@sname,@ssex,@academy,@grade,@class,@password,@b_n,
         @d_n,@contactway,@moveintime)"
         runat = "server" ></asp:SqlDataSource>
</asp:Content>

